﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Noris.Tools.TraceVisualiser.TraceData;

namespace Noris.Tools.TraceVisualiser.Forms
{
	internal partial class DocumentPropertiesForm : Noris.Tools.TraceVisualiser.Components.DForm
	{
		public DocumentPropertiesForm()
		{
			InitializeComponent();
            this.DocumentProperties.RunDocument += new EventHandler(DocumentProperties_RunDocument);
		}
        /// <summary>
        /// Data TraceDocument
        /// </summary>
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public TraceDocument Document
        {
            get { return this.DocumentProperties.Document; }
            set { this.DocumentProperties.Document = value; }
        }
        void DocumentProperties_RunDocument(object sender, EventArgs e)
        {
            this._RunDocument();
        }
        private void OkStorno_StornoClick(object sender, EventArgs e)
		{
			this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.Close();
		}
		private void OkStorno_OkClick(object sender, EventArgs e)
		{
            this._RunDocument();
		}
        private void _RunDocument()
        {
            this.DocumentProperties.DocumentOk = true;
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
	}
}
